import 'package:flutter/material.dart';
import 'package:test1/View/MyRowText.dart';
import 'package:test1/pages/widgets/Widget_Drawer_UserAccountsDrawerHeader_Page.dart';
import 'package:test1/pages/widgets/Widget_Drawer_UserDefinedDrawerHeader_Page.dart';

class Widget_Drawer_Page extends StatefulWidget {
  @override
  State<StatefulWidget> createState() {
    return Widget_Drawer_State();
  }
}

class Widget_Drawer_State extends State<Widget_Drawer_Page> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text("Drawer"),
        ),
        body: ListView(
          children: <Widget>[
            MyRowText("使用material中的UserAccountsDrawerHeader", () =>
                Navigator.push(
                    context, MaterialPageRoute(builder: (BuildContext context) {
                  return Widget_Drawer_UserAccountsDrawerHeader_Page();
                }))
            ),
            MyRowText("自定义DrawerHeader", () =>
                Navigator.push(
                    context, MaterialPageRoute(builder: (BuildContext context) {
                  return Widget_Drawer_UserDefinedDrawerHeader_Page();
                }))
            ),
          ],
        ),
      ),
    );
  }
}